home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / FILER / RENAME11.ZIP / !Rename / !Help < prev    next >
Text File  |  1997-07-04  |  10KB  |  250 lines

  1.  
  2.                           !Rename V1.11
  3.                           ~~~~~~~~~~~~~
  4.  
  5. Purpose
  6. ~~~~~~~
  7.  
  8. !Rename is a program intended to rename files in an 'intelligent' way.
  9. It is started in the normal way by double-clicking on the icon, after
  10. which it installs itself on the iconbar.
  11.  
  12.  
  13. How to use it
  14. ~~~~~~~~~~~~~
  15.  
  16. To rename a group of files, drag them to the iconbar icon. This will
  17. open a dialog box.
  18.  
  19. The dialog box is split into four areas, as below:
  20.  
  21.    Files      The files area contains a list of the names of files that
  22.               are possible candidates for renaming.
  23.  
  24.    Prototype  The prototype area contains a text box, and a number of
  25.               buttons which can substitute for keys. The buttons also
  26.               act as an aide memoire for the wildcard characters. These
  27.               wildcards act in a similar way to the wildcards in the
  28.               !Edit Find/Replace dialog box when 'wildcarded expressions'
  29.               is selected:
  30.  
  31.                 .    : Matches any character
  32.                 @    : Matches any alphabetic character
  33.                 ?    : Matches any alphanumeric character
  34.                 #    : Matches any digit
  35.                 []   : Matches any one of the characters inclosed in
  36.                        the brackets.
  37.                 ^    : Matches one or more of the following characters
  38.                        or wildcards.
  39.                 *    : Matches zero or more of the following characters
  40.                        or wildcards.
  41.                 %<c> : Literal <c>, to allow the inclusion of the wildcards
  42.                        in filenames (in practice, this only applies to
  43.                        '[' & ']' characters).
  44.  
  45.               In addition, there is a button to enable case-sensitive
  46.               filename matching.
  47.  
  48.    Rename To  This area contains a text box, another aide memoire button,
  49.               and a pair of number entry boxes. The field character '&'
  50.               must be followed by a field number, and substitutes for one
  51.               of the wildcard fields in the prototype section (the first
  52.               field is the field number one).
  53.  
  54.               Field number zero is used to give sequential numerical fields
  55.               in the resulting filename. The 'Digits' box states how many
  56.               digits are used in the index number, and the 'Sequence' box
  57.               gives the number of the first number generated.
  58.  
  59.               !Rename also provides a number of special non-numeric field
  60.               specifiers. Currently, these are:
  61.  
  62.                  &N : The complete filename
  63.                  &D : A best-guess DOS extension for the file type
  64.                  &U : A best-guess Unix extension for the file type.
  65.  
  66.               (See the examples section for a sample use of one of these).
  67.  
  68.               There is also a pop-up menu to force a change of case - This
  69.               may be set to one of:
  70.  
  71.                   As Is        : Keep the same case as the original file
  72.                   Upper        : Force all letters to upper case
  73.                   Lower        : Force all letters to lower case
  74.                   Initial Caps : The first letter in each "word" becomes a
  75.                                  capital letter, and all other letters are
  76.                                  lower case. In this context, a "word" is
  77.                                  any sequence of alphanumerics.
  78.  
  79.               Finally, there is an option button to instruct Rename to 'guess'
  80.               the RISCOS filetype of the file from its extension (or what the
  81.               extension was before any renaming occurs). Files created with
  82.               Windows 95 can confuse the filetyping mechanism of DOSFS; this
  83.               feature of !Rename will help to overcome this problem.
  84.  
  85.    Buttons    The buttons area consists of Cancel and Rename buttons, plus
  86.               the Pattern popup menu button.
  87.               The cancel and rename buttons perform the obvious tasks;
  88.               the Pattern popup menu is used to fill in the various dialog
  89.               box controls with values from either a named pattern, or the
  90.               immediately previous pattern.
  91.               By default, this history is 10 commands long; this can be
  92.               overridden by the OS variable Rename$NumPattern:
  93.                 SetEval Rename$NumPattern 20
  94.  
  95.  
  96. Examples
  97. ~~~~~~~~
  98.  
  99. To remove DOS extensions from RISCOS filenames (eg to rename 'tharg/jpg' to
  100. 'tharg'):
  101.  
  102.     Prototype : ^./^.
  103.     Rename To : &1
  104.  
  105. To rename all the files in a directory beginning with 'A' or 'a' to A_nnnn,
  106. where nnnn is a four-digit number starting at number 50:
  107.  
  108.     Prototype : [Aa]^.
  109.     Rename To : &1_&0
  110.     Sequence  : 50
  111.     Digits    : 4
  112.  
  113. Alternatively, one could use a prototype of "a^." with case sensitivity
  114. disabled.
  115.  
  116. To add a DOS extension to a RISCOS filename (eg to rename a group of mixed
  117. JPEGs, GIFs etc):
  118.  
  119.     Prototype : ^.
  120.     Rename To : &1/&D
  121.  
  122. To shift files into sub-directories according to DOS or Unix filetype extension
  123. (eg tharg/c becomes file tharg in subdirectory c):
  124.  
  125.     Prototype : ^./^.
  126.     Rename To : &2.&1
  127.  
  128.  
  129. Patterns
  130. ~~~~~~~~
  131.  
  132. It is possible to save the immediately preceeding rename parameters by the use
  133. of named patterns. The 'Patterns' iconbar menu option leads to the following
  134. options:
  135.  
  136.   Save   : This menu item leads to a small dialog box where the current pattern
  137.            can be given a name (up to 24 characters long). Enter the name by
  138.            which you wish to remember the pattern, and click the 'OK' button.
  139.            If the maximum number of patterns have already been saved, this item
  140.            is greyed.
  141.  
  142.   Delete : This menu item leads to a list of currently-known patterns; selecting
  143.            one of these items will delete the saved pattern.
  144.            If there are no patterns to delete, this item is greyed.
  145.  
  146.  
  147. Maximum filename length
  148. ~~~~~~~~~~~~~~~~~~~~~~~
  149.  
  150. The maximum 10-character filename imposed by ADFS can be accidentally
  151. exceeded with the pattern renaming provided by !Rename. To prevent this
  152. from happening, the iconbar menu for !Rename has the "Truncate" option,
  153. which leads to a small dialog box where the maximum allowable filename
  154. length can be set. Clicking on the Truncate option itself will toggle
  155. whether filename truncation is active or not (for simplicity, !Rename has
  156. a maximum internal filename length of 100 characters, which should be
  157. enough for most purposes!).
  158.  
  159. The initial setting of the Truncate option can be set by editing the Messages
  160. file inside !Rename. Search for the line beginning "Truncate:", and replace
  161. the number after the colon with the new default value. If the value is negative,
  162. !Rename will use its absolute value, but with truncation initially disabled. If
  163. the value is zero, it is treated as -10.
  164.  
  165.  
  166. Copy/Delete
  167. ~~~~~~~~~~~
  168.  
  169. Some filing systems (eg SparkFS) do not support renaming. The Copy/Delete
  170. option on the iconbar menu can be used to overcome this limitation; if ticked,
  171. all !Rename operations will be performed by copying the file to the new name,
  172. and then deleting the old file. This will generally have a significant impact
  173. on performance, but at least it will work!
  174.  
  175. !Rename is distributed with Copy/Delete set OFF by default. However, this default
  176. setting can be altered by editing the Messages file inside !Rename - simply replace
  177. the line "CopyDel:0" with "CopyDel:1".
  178.  
  179. TypeMap file
  180. ~~~~~~~~~~~~
  181.  
  182. There does not seem to be a particularly neat way of deducing a DOS or Unix
  183. extension from a RISCOS filetype; specifically, there is no SWI to look up
  184. the current DOSMap settings. !Rename therefore needs to be provided with a
  185. set of mappings to use for the &D and &U special fields. These mappings are
  186. stored in the file "TypeMap" in the !Rename application directory, and can be
  187. editted by the user as and when additional mappings need to be represented.
  188. The format of this file is very simple: Each mapping is on a new line, and
  189. consists of the RISCOS filetype value in hex (000-FFF), the DOS extension, and
  190. the Unix extension. Mappings can be given in any order, and the hex value may
  191. be upper or lower case.
  192.  
  193.  
  194. Known Bugs
  195. ~~~~~~~~~~
  196.  
  197. None at this time.
  198.  
  199.  
  200. History
  201. ~~~~~~~
  202.  
  203.   Version  Changes
  204.   ~~~~~~~  ~~~~~~~
  205.     1.00   Initial distribution version
  206.     1.01   Added case override for the output file;
  207.            added maximum filename length;
  208.            Special fields &N, &D and &U implemented.
  209.     1.02   Fixed bug with RISCOS filetypes with no
  210.            known Unix/DOS equivalent.
  211.            Fixed maximum filename length bug.
  212.     1.03   Can now rename files into sub-directories;
  213.            "Previous" button turned into a popup menu,
  214.            so many named patterns can be remembered.
  215.     1.04   Fixed bug with pre-RiscPC error handling
  216.     1.05   Minor alteration to case override definition
  217.            for 'Initial Capital'.
  218.     1.06   Added RISCOS filetyping button to alleviate DOSFS
  219.            problem with Windows 95 files.
  220.     1.07   "Comma" bug fixed.
  221.            Can now open dialog box with an click on the iconbar icon,
  222.            and add files to the list (but all files must be in same
  223.            directory).
  224.     1.08   WimpSlot increase to 64K so squeezed !RunImage decompresses OK.
  225.     1.09   Now distributed with !RunImage /not/ squeezed, and WimpSlot
  226.            back at 54K
  227.     1.10   Copy/Delete option added; and default Truncate value moved into
  228.            messages file.
  229.     1.11   Marginal improvement to error handling
  230.  
  231.  
  232. Disclaimer
  233. ~~~~~~~~~~
  234.  
  235. This software is provided 'as is', and 1 accept no responsibility for any loss
  236. caused as a result of its use.
  237.  
  238. That notwithstanding, I am perfectly happy to receive bug reports via email (or
  239. snail mail, come to that). Please state:
  240.  
  241.   a) the version in use
  242.   b) a description of the bug
  243.   c) a list of filenames dragged to the iconbar
  244.   d) the 'Prototype' & 'Rename To' fields, whether case sensitivity was enabled,
  245.      and any other constraints (Maximum filename length, case overrides, etc)
  246.  
  247. ____________
  248. Nick Roberts
  249. tigger@argonet.co.uk
  250. http://www.argonet.co.uk/users/tigger/